package com.cstor.liang.web.system;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class SysPageController {

    @RequestMapping("{url}.html")
    public String page(@PathVariable("url") String url) {
        return url;
    }

    @RequestMapping("{module}/{url}.html")
    public String page(@PathVariable("module") String module, @PathVariable("url") String url) {
        return module + "/" + url;
    }

    @RequestMapping("{module}/{function}/{url}.html")
    public String page(@PathVariable("module") String module, @PathVariable("function") String function,
                       @PathVariable("url") String url) {
        return module + "/" + function + "/" + url;
    }

    @RequestMapping("{module}/{function}/{extend}/{url}.html")
    public String page(@PathVariable("module") String module, @PathVariable("function") String function,
                       @PathVariable("extend") String extend, @PathVariable("url") String url) {
        return module + "/" + function + "/" + extend + "/" + url;
    }

}
